import {View, Button, Text, Image, ScrollView, Radio} from '@tarojs/components';
import Taro from '@tarojs/taro';
import React, {Component} from 'react';
import * as T from '../types';
import './memberEquity.less';
import actions from '../actions/index';
import {connect} from 'react-redux';
import {store2Props} from '../selectors';
import chijingEquityImage1 from '@/assets/image/member/chijingEquity1.png';
import chijingEquityImage2 from '@/assets/image/member/chijingEquity2.png';
import chijingEquityImage3 from '@/assets/image/member/chijingEquity3.png';
import chijingEquityImage4 from '@/assets/image/member/chijingEquity4.png';
import lanjingEquityImage1 from '@/assets/image/member/lanjingEquity1.png';
import lanjingEquityImage2 from '@/assets/image/member/lanjingEquity2.png';
import lanjingEquityImage3 from '@/assets/image/member/lanjingEquity3.png';
import lanjingEquityImage4 from '@/assets/image/member/lanjingEquity4.png';
interface ComponentState {
  newUserModel: boolean;
}

type ITopProps = T.IProps & T.ITopProps & ComponentState;
//@ts-ignore
@connect<Partial<ITopProps>, T.ITopState>(store2Props, actions)
export default class Info extends Component<Partial<ITopProps>, T.ITopState> {
  constructor(props: ITopProps) {
    super(props);
    this.state = {};
  }

  render() {
    let {
      actions: {action},
      // main: {
      //   memberCardType
      // }
    } = this.props;
    // let className = ["lanjing", "noMember"].includes(memberCardType) ? "lanjing" : "chijing"
    const isBlue = true;
    return (
      <>
        <View style={{width: '100%', height: '32rpx', background: '#f5f7f9'}} />
        <View className="memberEquity memberEquity-lanjing">
          <View className="memberEquity-title">
            <View
              className="memberEquity-title-line"
              style={{
                marginRight: '16rpx',
              }}
            />
            会员权益
            <View
              className="memberEquity-title-line"
              style={{
                marginLeft: '16rpx',
              }}
            />
          </View>
          <View className="memberEquityList memberEquityList-chijing memberEquityList-lanjing">
            <View className="memberEquityList-item">
              <Text className="memberEquityList-title">社区服务</Text>
              <Text className="memberEquityList-subContent">省心便捷随心抵</Text>
              <Text className="memberEquityList-subContent">你想要我的都有</Text>
              <Image className="memberEquityList-Image" src={isBlue ? lanjingEquityImage1 : chijingEquityImage1} />
            </View>
            <View className="memberEquityList-item">
              <Text className="memberEquityList-title">生活缴费</Text>
              <Text className="memberEquityList-subContent">最低1折起</Text>
              <Text className="memberEquityList-subContent">积分当钱花</Text>
              <Image className="memberEquityList-Image" src={isBlue ? lanjingEquityImage2 : chijingEquityImage2} />
            </View>
            <View className="memberEquityList-item">
              <Text className="memberEquityList-title">购物福利</Text>
              <Text className="memberEquityList-subContent">会员0元购</Text>
              <Text className="memberEquityList-subContent">优惠叠加更低价</Text>
              <Image className="memberEquityList-Image" src={isBlue ? lanjingEquityImage3 : chijingEquityImage3} />
            </View>
            <View className="memberEquityList-item">
              <Text className="memberEquityList-title">魔力世界主题乐园</Text>
              <Text className="memberEquityList-subContent">游玩培训应有尽有</Text>
              <Text className="memberEquityList-subContent">预计省XXX元</Text>
              <Image className="memberEquityList-Image" src={isBlue ? lanjingEquityImage4 : chijingEquityImage4} />
            </View>
          </View>
        </View>
      </>
    );
  }
}
